
cc.Class({
    extends: cc.Component,

    properties: {
     
    },

    

     onLoad () {
     cc.find("Canvas/bg").on("touchstart",this.dicimove.bind(this));
     },

     dicimove:function(){
     this.node.runAction(cc.moveBy(0.1,cc.p(0,142)));
     },

     update (dt) {
      
     var hero = cc.find("Canvas/bg/hero");
     var herorect = hero.getBoundingBoxToWorld();
     var dicirect = this.node.getBoundingBoxToWorld();
 
    if(cc.rectIntersectsRect(herorect,dicirect)){

        cc.director.loadScene("over");
       // cc.find("Canvas").off("touchstart",cc.find("Canvas").getComponent("Game").inputcontrol());
    }
     },
});
